/*
 * crc_16.h
 */

#ifndef __CRC_16_H_
#define __CRC_16_H_


#include <public/basic_types.h>



extern uint16_t CRCWord16Table[256];


/**
 * \initialize the CRC table
 */
void init_CRC_word16_table();//OK

/**
 * \function to set seed and generate the CRC
 */
word16_t set_seed_and_calculate_CRC_word16(uint16_t _numBytes, const byte_t *_pData , word16_t seed);

/**
 * \function to generate the CRC
 */
word16_t calculate_CRC_word16(uint16_t  _numBytes, const byte_t * _pData);//OK

/**
 * \function to check the CRC
 */
bool_t check_CRC_word16(uint16_t  _numBytes, const byte_t * _pData, word16_t crc);

#endif /* __CRC_16_H_ */
